<template>
    <view class="view-wrap">
        <view>
            <uni-forms ref="formRef" :label-width="100" :model-value="form" :rules="rules">
                <uni-forms-item label="原密码" required name="oldPassword"
                    ><uni-easyinput v-model="form.oldPassword" type="password" placeholder="请输入原密码"
                /></uni-forms-item>
                <uni-forms-item label="新密码" required name="newPassword"
                    ><uni-easyinput v-model="form.newPassword" type="password" placeholder="请输入新密码"
                /></uni-forms-item>
                <uni-forms-item label="确认新密码" required name="confirmNewPassword"
                    ><uni-easyinput v-model="form.confirmNewPassword" type="password" placeholder="请确认新密码"
                /></uni-forms-item>
            </uni-forms>
            <button type="primary" @click="submit">提交</button>
        </view>
    </view>
</template>
<script setup lang="ts">
import useChangePassword from './useChangePassword';

const { form, formRef, rules, submit, submitForm } = useChangePassword();
</script>
